Skip to content

bugfix(network): Prevent crash during Steam Networking Sockets re-initialization#492

Merged
x64-dev merged 1 commit intomainfrom
seer/fix/network-reinit-race
May 7, 2026
Merged

bugfix(network): Prevent crash during Steam Networking Sockets re-initialization#492
x64-dev merged 1 commit intomainfrom
seer/fix/network-reinit-race

Conversation

@seer-by-sentry
Copy link
Copy Markdown

@seer-by-sentry seer-by-sentry Bot commented May 7, 2026

Fixes CLIENT-19Z. The issue was that: GameNetworkingSockets library's internal mutexes are corrupted during rapid initialization/deinitialization, leading to an access violation on subsequent lock attempts.

  • Introduced a global guard flag g_bNetworkMeshDestroying to control the execution of the OnSteamNetConnectionStatusChanged callback.
  • Set g_bNetworkMeshDestroying to true before GameNetworkingSockets_Kill() to prevent callbacks from firing while the library is being torn down.
  • Set g_bNetworkMeshDestroying to false after GameNetworkingSockets_Init() and callback registration to safely re-enable callbacks.
  • This prevents EXCEPTION_ACCESS_VIOLATION_READ errors that could occur if callbacks were dispatched while internal mutexes were freed but not yet rebuilt during library re-initialization.

This fix was generated by Seer in Sentry, triggered by x64-dev. 👁️ Run ID: 13508814

Not quite right? Click here to continue debugging with Seer.

@seer-by-sentry seer-by-sentry Bot requested a review from x64-dev May 7, 2026 21:22
@x64-dev x64-dev marked this pull request as ready for review May 7, 2026 21:22
@x64-dev x64-dev merged commit e5b50aa into main May 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant